package ipfms.stripes.maintenance;

import able.stripes.JSP;
import com.google.inject.Inject;
import ipfms.dao.*;
import ipfms.model.*;
import ipfms.stripes.BaseActionBean;
import java.util.ArrayList;
import java.util.List;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.UrlBinding;

/**
 * @author haqqiem
 * 18 Jan 2012 4:26:23 PM
 */

@UrlBinding("/report_list")
public class ReportListActionBean extends BaseActionBean {

    private Pengguna pengguna = new Pengguna();
    private List<FaultyReport> listOfReport = new ArrayList<FaultyReport>();

    @Inject
    private FaultyReportDAO fReportDAO;

    @DefaultHandler
    public Resolution showForm() {
        listOfReport = fReportDAO.findAll();
        return new JSP("maintenance/report_list.jsp");
    }

    public Resolution back() {
        return showForm();
    }

    public List<FaultyReport> getListOfReport() {
        return listOfReport;
    }

    public void setListOfReport(List<FaultyReport> listOfReport) {
        this.listOfReport = listOfReport;
    }

    public Pengguna getPengguna() {
        return pengguna;
    }

    public void setPengguna(Pengguna pengguna) {
        this.pengguna = pengguna;
    }
    
}
